<html>
	<head>
		
	</head>
	<body>
		<h3>Modificar Imágenes de la propiedad "<?php echo $this->request->data['Propiedade']['direccion'] ?>"</h3>
		<?php 
		echo $this->Html->link('Agregar Imagen', array('controller' => 'Imagenes', 'action' => 'add',$this->request->data['Propiedade']['id']));
		?>
		<table>
			<thead class="listHeader">
				<tr>
					<td>ID</td>
					<td>Preview</td>
					<td>Path de la imagen</td>
					<td>Acciones</td>				
				</tr>
			</thead>
			<tbody>				
				<?php 
					$imagenes = $this->request->data['Imagene'];					
					foreach($imagenes as $img):
				?>
				<tr>
					<td><?php echo $img['id'] ?></td>
					<td>
						<img src="/inmobiliaria/<?php echo $img['path'] ?>" style="width: 100px"/>
					</td>
					<td><a target="_blank" href="/inmobiliaria/<?php echo $img['path'] ?>"><?php echo $img['path'] ?></a></td>
					<td>						
						<?php echo $this->Form->postLink(
							'Delete',							
							array('controller'=>'imagenes','action' => 'delete', $img['id'],$this->request->data['Propiedade']['id']),
							array('confirm' => 'Desea eliminar esta imagen?'));
						?>						
					</td>
					
				</tr>
				<?php endforeach; ?>				
			</tbody>
		</table>
	</body>
</html>